import request from '../utils/request'
// 删除用户搜索历史
export function delHistory (data) {
  return request({
    url: 'v1_0/search/histories',
    method: 'DELETE',
    needToken: true,
    data: data
  })
}

// 获取搜索结果
export function getSearchRes (params) {
  return request({
    url: 'v1_0/search',
    method: 'GET',
    params: params
  })
}

// 获取用户搜索历史
export function getSearchHis (params) {
  return request({
    url: 'v1_0/search/histories',
    method: 'GET',
    needToken: true,
    params: params
  })
}

// 获取联想建议（自动补全）
export function getLenovo (params) {
  return request({
    url: 'v1_0/suggestion',
    method: 'GET',
    params: params
  })
}
